package com.zuoye.zuoye6;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Suv> auto = new ArrayList<>();
        auto.add(new Suv("宝马",4800,180000));
        auto.add(new Suv("奔驰",5080,280000));
        auto.add(new Suv("雷克萨斯",4010,200000));
        //System.out.println(auto.get(0).getLength());
        for (int i = 0; i < auto.size(); i++) {
            if (auto.get(i).jude()==Suv.small){
                System.out.println("车型为小型车");
            }else if (auto.get(i).jude()==Suv.middle){
                System.out.println("车型为中型车");
            }else {
                System.out.println("车型为大型车");
            }
        System.out.println(auto.get(i).toString());
        }
    }
}
